<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>分类</title>

    <link rel="stylesheet" href="../static/css/homepage.css" th:href="@{/css/homepage.css}">
    <link rel="stylesheet" href="../static/css/detailpage.css" th:href="@{/css/detailpage.css}">
    <link rel="stylesheet" href="../static/css/typespage.css" th:href="@{/css/typespage.css}">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
</head>
<body>

<!--导航-->
<nav class="ui inverted attached segment ty-shadow-small" th:replace="fragments::menu(2)">
    <div class="ui container">
        <div class="ui inverted secondary stackable menu hp-padded-tb-mini">
            <h2 class="ui teal header item">Blog</h2>
            <a href="#"class="nav-item item hp-mobile-hide"><i class="home icon"></i>首页</a>
            <a href="#"class="nav-item item hp-mobile-hide active"><i class="idea icon"></i>分类</a>
            <a href="#"class="nav-item item hp-mobile-hide"><i class="tags icon"></i>标签</a>
            <a href="#"class="nav-item item hp-mobile-hide"><i class="clone icon"></i>归档</a>
            <a href="#"class="nav-item item hp-mobile-hide"><i class="info icon"></i>关于我</a>
            <div class="nav-item right item hp-mobile-hide">
                <div class="ui icon input transparent inverted">
                    <input type="text" placeholder="Search....">
                    <i class="search link icon"></i>
                </div>
            </div>
        </div>
    </div>
    <a href="#" class="ui icon black button hp-nav-list-mobile hp-sidebar-hide" id="nav-sidebar">
        <i class="sidebar icon"></i>
    </a>
</nav>

<!--中间部分-->
<div class="hp-padded-tb-large dt-container dt-opacity-small">
    <div class="ui container">
<!--        header-->
        <div class="ui top attached segment">
            <div class="ui middle aligned two column stackable grid">
                <div class="column">
                    <h3 class="ui teal header">分类</h3>
                </div>
                <div class="column right aligned">
                    共 <h3 class="ui orange header hp-inline-block hp-text-thin" th:text="${#arrays.length(types)}"> 14 </h3> 个
                </div>
            </div>
        </div>
<!--        放置分类区域-->
        <div class="ui attached segment">
            <div class="ui labeled button ty-margin-tb-tiny" th:each="type:${types}">
                <a href="#" th:href="@{/types/{id}(id=${type.id})}" class="ui button basic" th:classappend="${type.id==activeTypeId}?'teal'"  th:text="${type.name}">思考与感悟</a>
                <div class="ui left pointing label basic" th:classappend="${type.id==activeTypeId}?'teal'" th:text="${#arrays.length(type.blogs)}">24</div>
            </div>
            <!--/*-->
            <div class="ui labeled button ty-margin-tb-tiny">
                <a href="#" class="ui basic teal button">思考与感悟</a>
                <div class="ui basic teal left pointing label">24</div>
            </div>
            <div class="ui labeled button ty-margin-tb-tiny">
                <a href="#" class="ui basic teal button">思考与感悟</a>
                <div class="ui basic teal left pointing label">24</div>
            </div>
            <div class="ui labeled button ty-margin-tb-tiny">
                <a href="#" class="ui basic teal button">思考与感悟</a>
                <div class="ui basic teal left pointing label">24</div>
            </div>
            <div class="ui labeled button ty-margin-tb-tiny">
                <a href="#" class="ui basic teal button">思考与感悟</a>
                <div class="ui basic teal left pointing label">24</div>
            </div>
            <div class="ui labeled button ty-margin-tb-tiny">
                <a href="#" class="ui basic teal button">思考与感悟</a>
                <div class="ui basic teal left pointing label">24</div>
            </div>
            <div class="ui labeled button ty-margin-tb-tiny">
                <a href="#" class="ui basic teal button">思考与感悟</a>
                <div class="ui basic teal left pointing label">24</div>
            </div>
            <div class="ui labeled button ty-margin-tb-tiny">
                <a href="#" class="ui basic teal button">思考与感悟</a>
                <div class="ui basic teal left pointing label">24</div>
            </div>
            <!--*/-->
        </div>
<!--        博客-->
        <div class="ui teal top attached segment">
            <div class="ui padded vertical segment hp-padded-tb-large" th:each="blog:${page.content}">
                <div class="ui middle aligned mobile reversed stackable grid">
                    <div class="eleven wide column">
                        <h3 class="ui header"><a href="#" th:href="@{/blog/{id}(id=${blog.id})}" class="hp-black" th:text="${blog.title}">你真的理解什么是财富自由吗?</a></h3>
                        <p class="hp-text" th:text="|${blog.description}......|">正确做好任何一件事情的前提是清晰，正确的理解目标，而事实是，我们很多人很多时候根本没有
                            对目标正确的定义，甚至根本从来就没有想过，只是大家都那么做而已......
                        </p>
                        <div class="ui stackable grid">
                            <div class="eleven wide column">
                                <div class="ui horizontal link list">
                                    <div class="item">
                                        <img src="https://unsplash.it/100/100/?random" th:src="@{${blog.user.avatar}}" alt="" class="ui avatar image">
                                        <div class="content"><a href="#" class="header" th:text=${blog.user.nickname}>Mrbear</a></div>
                                    </div>
                                    <div class="item">
                                        <i class="calendar icon"></i><span th:text="${#dates.format(blog.updateTime,'yyyy-MM-dd HH:mm')}">2020-06-12</span>
                                    </div>
                                    <div class="item">
                                        <i class="eye icon"></i><span th:text="${blog.views}">123</span>
                                    </div>
                                </div>
                            </div>
                            <div class="five wide column right aligned">
                                <a href="#" target="_blank" class="ui teal basic label hp-text-thin" th:text="${blog.type.name}">认知升级</a>
                            </div>
                        </div>
                    </div>
                    <div class="five wide column dt-opacity-mini">
                        <a href="#" th:href="@{/blog/{id}(id=${blog.id})}">
                            <img style="opacity: 10 !important;" src="https://unsplash.it/800/450/?random" th:src="@{${blog.firstPicture}}" alt="" class="ui rounded image">
                        </a>
                    </div>
                </div>
            </div>

            <!--/*-->
            <div class="ui padded vertical segment hp-padded-tb-large">
                <div class="ui mobile reversed stackable grid">
                    <div class="eleven wide column">
                        <h3 class="ui header">你真的理解什么是财富自由吗?</h3>
                        <p class="hp-text">正确做好任何一件事情的前提是清晰，正确的理解目标，而事实是，我们很多人很多时候根本没有
                            对目标正确的定义，甚至根本从来就没有想过，只是大家都那么做而已......
                        </p>
                        <div class="ui stackable grid">
                            <div class="eleven wide column">
                                <div class="ui horizontal link list">
                                    <div class="item">
                                        <img src="https://unsplash.it/100/100/?random" alt="" class="ui avatar image">
                                        <div class="content"><a href="#" class="header">Mrbear</a></div>
                                    </div>
                                    <div class="item">
                                        <i class="calendar icon"></i>2020-06-12
                                    </div>
                                    <div class="item">
                                        <i class="eye icon"></i>123
                                    </div>
                                </div>
                            </div>
                            <div class="five wide column right aligned">
                                <a href="#" target="_blank" class="ui teal basic label hp-text-thin">认知升级</a>
                            </div>
                        </div>
                    </div>
                    <div class="five wide column">
                        <a href="#" target="_blank">
                            <img src="https://unsplash.it/800/450/?random" alt="" class="ui rounded image">
                        </a>
                    </div>
                </div>
            </div>
            <div class="ui padded vertical segment hp-padded-tb-large">
                <div class="ui mobile reversed stackable grid">
                    <div class="eleven wide column">
                        <h3 class="ui header">你真的理解什么是财富自由吗?</h3>
                        <p class="hp-text">正确做好任何一件事情的前提是清晰，正确的理解目标，而事实是，我们很多人很多时候根本没有
                            对目标正确的定义，甚至根本从来就没有想过，只是大家都那么做而已......
                        </p>
                        <div class="ui stackable grid">
                            <div class="eleven wide column">
                                <div class="ui horizontal link list">
                                    <div class="item">
                                        <img src="https://unsplash.it/100/100/?random" alt="" class="ui avatar image">
                                        <div class="content"><a href="#" class="header">Mrbear</a></div>
                                    </div>
                                    <div class="item">
                                        <i class="calendar icon"></i>2020-06-12
                                    </div>
                                    <div class="item">
                                        <i class="eye icon"></i>123
                                    </div>
                                </div>
                            </div>
                            <div class="five wide column right aligned">
                                <a href="#" target="_blank" class="ui teal basic label hp-text-thin">认知升级</a>
                            </div>
                        </div>
                    </div>
                    <div class="five wide column">
                        <a href="#" target="_blank">
                            <img src="https://unsplash.it/800/450/?random" alt="" class="ui rounded image">
                        </a>
                    </div>
                </div>
            </div>
            <div class="ui padded vertical segment hp-padded-tb-large">
                <div class="ui mobile reversed stackable grid">
                    <div class="eleven wide column">
                        <h3 class="ui header">你真的理解什么是财富自由吗?</h3>
                        <p class="hp-text">正确做好任何一件事情的前提是清晰，正确的理解目标，而事实是，我们很多人很多时候根本没有
                            对目标正确的定义，甚至根本从来就没有想过，只是大家都那么做而已......
                        </p>
                        <div class="ui stackable grid">
                            <div class="eleven wide column">
                                <div class="ui horizontal link list">
                                    <div class="item">
                                        <img src="https://unsplash.it/100/100/?random" alt="" class="ui avatar image">
                                        <div class="content"><a href="#" class="header">Mrbear</a></div>
                                    </div>
                                    <div class="item">
                                        <i class="calendar icon"></i>2020-06-12
                                    </div>
                                    <div class="item">
                                        <i class="eye icon"></i>123
                                    </div>
                                </div>
                            </div>
                            <div class="five wide column right aligned">
                                <a href="#" target="_blank" class="ui teal basic label hp-text-thin">认知升级</a>
                            </div>
                        </div>
                    </div>
                    <div class="five wide column">
                        <a href="#" target="_blank">
                            <img src="https://unsplash.it/800/450/?random" alt="" class="ui rounded image">
                        </a>
                    </div>
                </div>
            </div>
            <div class="ui padded vertical segment hp-padded-tb-large">
                <div class="ui mobile reversed stackable grid">
                    <div class="eleven wide column">
                        <h3 class="ui header">你真的理解什么是财富自由吗?</h3>
                        <p class="hp-text">正确做好任何一件事情的前提是清晰，正确的理解目标，而事实是，我们很多人很多时候根本没有
                            对目标正确的定义，甚至根本从来就没有想过，只是大家都那么做而已......
                        </p>
                        <div class="ui stackable grid">
                            <div class="eleven wide column">
                                <div class="ui horizontal link list">
                                    <div class="item">
                                        <img src="https://unsplash.it/100/100/?random" alt="" class="ui avatar image">
                                        <div class="content"><a href="#" class="header">Mrbear</a></div>
                                    </div>
                                    <div class="item">
                                        <i class="calendar icon"></i>2020-06-12
                                    </div>
                                    <div class="item">
                                        <i class="eye icon"></i>123
                                    </div>
                                </div>
                            </div>
                            <div class="five wide column right aligned">
                                <a href="#" target="_blank" class="ui teal basic label hp-text-thin">认知升级</a>
                            </div>
                        </div>
                    </div>
                    <div class="five wide column">
                        <a href="#" target="_blank">
                            <img src="https://unsplash.it/800/450/?random" alt="" class="ui rounded image">
                        </a>
                    </div>
                </div>
            </div>
            <!--*/-->
        </div>
<!--        分页-->
        <div class="ui bottom attached segment">
            <div class="ui middle aligned two column stackable grid">
                <div class="column">
                    <a href="#" th:if="${page.first}" th:href="@{/types/{id}(id=${activeTypeId},page=${page.number})}" class="ui mini teal basic button">上一页</a>
                    <a href="#" th:if="!${page.first}" th:href="@{/types/{id}(id=${activeTypeId},page=${page.number}-1)}" class="ui mini teal basic button">上一页</a>
                </div>
                <div class="column right aligned">
                    <a href="#" th:if="!${page.last}" th:href="@{/types/{id}(id=${activeTypeId},page=${page.number}+1)}" class="ui mini teal basic button">下一页</a>
                    <a href="#" th:if="${page.last}" th:href="@{/types/{id}(id=${activeTypeId},page=${page.number})}" class="ui mini teal basic button">下一页</a>
                </div>
            </div>
        </div>
    </div>
</div>
<br><br>

<!--底部-->
<footer class="ui inverted vertical segment hp-padded-tb-massive" th:replace="fragments::footer">
    <div class="ui center aligned container">
        <div class="ui inverted divided stackable grid">
            <div class="three wide column">
                <div class="ui inverted link list">
                    <div class="item">
                        <img src="../static/images/wechat.jpg" th:src="@{/images/wechat.jpg}" class="ui rounded image" style="width: 110px" alt="">
                    </div>
                </div>
            </div>
            <div class="three wide column">
                <h4 class="ui inverted header hp-text-thin hp-text-spaced">最新博客</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item">用户故事 （User Story）</a>
                    <a href="#" class="item">用户故事 （User Story）</a>
                    <a href="#" class="item">用户故事 （User Story）</a>
                </div>
            </div>
            <div class="three wide column">
                <h4 class="ui inverted header hp-text-thin hp-text-spaced">联系我们</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item">Email:1402998477@qq.com</a>
                    <a href="#" class="item">QQ:1402998477</a>
                </div>
            </div>
            <div class="seven wide column">
                <h4 class="ui inverted header hp-text-thin hp-text-spaced">Mrbear</h4>
                <p class="hp-text-thin hp-text-spaced hp-opacity-mini">这是我的个人博客、会分享关于编程、写作、思考相关的内容，希望可以给来到这儿的人有所帮助...</p>
            </div>
        </div>
        <div class="ui inverted section divider"></div>
        <p class="hp-text-thin hp-text-spaced hp-opacity-mini">Copyright ©2019-2022 Mrbear Designed By Mrbear</p>
    </div>
</footer>

<th:block th:replace="fragments::script"></th:block>
<script>
<!--    sidebar-->
    $('#nav-sidebar').click(function () {
        $('.nav-item').toggleClass('hp-mobile-hide');
    });

</script>
</body>
</html>